public PreLaunchNotyUser GetByAppUserId(string identityUserId) { using (var context = new CPL.Data.Infrastructure.CplContext()) { return(context.PreLaunchNotyUsers.FirstOrDefault(_ => _.AppIdentityUserId == identityUserId)); } }
public bool IsUserNameTaken(string username) { using (var context = new CPL.Data.Infrastructure.CplContext()) { return(context.PreLaunchNotyUsers.Any(_ => _.UserName == username)); } }
public PreLaunchNotyUser GetByAppUserId(int appUserId) { using (var context = new CPL.Data.Infrastructure.CplContext()) { return(context.PreLaunchNotyUsers.Find(appUserId)); } }
public bool Delete(PreLaunchNotyUser preLaunchUser) { using (var context = new CPL.Data.Infrastructure.CplContext()) { context.Entry(preLaunchUser).State = EntityState.Deleted; context.SaveChanges(); return(true); } }
public PreLaunchNotyUser Update(PreLaunchNotyUser preLaunchUser) { using (var context = new CPL.Data.Infrastructure.CplContext()) { context.Entry(preLaunchUser).State = EntityState.Modified; context.SaveChanges(); return(preLaunchUser); } }
public PreLaunchNotyUser Create(PreLaunchNotyUser preLaunchUser) { using (var context = new CPL.Data.Infrastructure.CplContext()) { context.PreLaunchNotyUsers.Add(preLaunchUser); context.SaveChanges(); return(preLaunchUser); } }