dfmmalaw
4/3/2017 - 4:02 PM

Add record to database table in C#

Add record to database table in C#

if (model.Roles != null && model.Roles[0] == "Client Integration")
{
    clientUser.ClientUserConsents.Add(new ClientUserConsent
    {
        ClientUserId = clientUser.ClientUserId,
        ConsentDate = TimeService.Instance.now(),
        VersionNumber = ConfigHelper.ClientConsentVersionNumber
    });
}

clientViewClientUserService.UpdateAssignedViews(clientUser, model.SelectedViews);

clientUserRepository.saveChanges();