示例#1
0
        public async Task <BioLanding> Update(BioLanding entity)
        {
            var result = context.Landings.Update(entity);
            await context.SaveChangesAsync();

            return(result.Entity);
        }
示例#2
0
        public async Task <BioLanding> Insert(BioLanding bioLanding)
        {
            var result = await context.AddAsync(bioLanding);

            await context.SaveChangesAsync();

            return(result.Entity);
        }
示例#3
0
 public static BioLandingViewModel ToViewModel(this BioLanding bioLanding)
 {
     return(new BioLandingViewModel
     {
         Id = bioLanding.Id,
         Name = bioLanding.Name,
         Title = bioLanding.Title
     });
 }