public static async Task <bool> Update(TestAppEntities ctx, CustomFiles item) { ctx.Update(item); await ctx.SaveChangesAsync(); return(true); }
public static async Task <Users> Add(TestAppEntities ctx, Users item) { ctx.Users.Add(item); await ctx.SaveChangesAsync(); return(item); }
public static async Task <CustomFiles> Add(TestAppEntities ctx, CustomFiles item) { ctx.CustomFiles.Add(item); await ctx.SaveChangesAsync(); return(item); }
public static async Task <bool> Delete(TestAppEntities ctx, int id) { var user_item = await ctx.CustomFiles.SingleOrDefaultAsync(m => m.customfile_id == id); ctx.CustomFiles.Remove(user_item); await ctx.SaveChangesAsync(); return(true); }
public static async Task <CustomFiles> GetItem(TestAppEntities ctx, int id) { return(await(from x in ctx.CustomFiles where x.customfile_id == id select x).FirstOrDefaultAsync()); }
public static async Task <List <CustomFiles> > GetList(TestAppEntities ctx) { return(await(from x in ctx.CustomFiles select x).ToListAsync()); }
public static async Task <Users> GetItem(TestAppEntities ctx, string email) { return(await(from x in ctx.Users where x.email == email select x).FirstOrDefaultAsync()); }
public static async Task <Users> GetItem(TestAppEntities ctx, int user_id) { return(await(from x in ctx.Users where x.user_id == user_id select x).FirstOrDefaultAsync()); }
public static async Task <List <Users> > GetList(TestAppEntities ctx) { return(await(from x in ctx.Users select x).ToListAsync()); }