示例#1
0
        public SuUserOrganizationModel UpdateUserOrganization(SuUserOrganizationModel suUserOrganizationChanges)
        {
            var suUserOrganization = context.DbUserOrganization.Attach(suUserOrganizationChanges);

            suUserOrganization.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(suUserOrganizationChanges);
        }
示例#2
0
 public SuUserOrganizationModel AddUserOrganization(SuUserOrganizationModel suUserOrganization)
 {
     context.DbUserOrganization.Add(suUserOrganization);
     context.SaveChanges();
     return(suUserOrganization);
 }