public SuContentTypeModel UpdateContentType(SuContentTypeModel suContentTypeChanges) { var changedContentType = context.DbContentType.Attach(suContentTypeChanges); changedContentType.State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); return(suContentTypeChanges); }
public SuContentTypeModel AddContentType(SuContentTypeModel suContentType) { context.DbContentType.Add(suContentType); context.SaveChanges(); return(suContentType); }