Beispiel #1
0
        public async Task <F1Team> InsertAsync(F1TeamUpdateModel f1Team)
        {
            var result = await this.Context.AddAsync(this.Mapper.Map <DataAccess.Entities.F1Team>(f1Team));

            await this.Context.SaveChangesAsync();

            return(this.Mapper.Map <F1Team>(result.Entity));
        }
Beispiel #2
0
        public async Task <F1Team> UpdateAsync(F1TeamUpdateModel f1Team)
        {
            var existing = await this.Get(f1Team);

            var result = this.Mapper.Map(f1Team, existing);

            this.Context.Update(result);

            await this.Context.SaveChangesAsync();

            return(this.Mapper.Map <F1Team>(result));
        }
 public Task <F1Team> CreateAsync(F1TeamUpdateModel f1Team)
 {
     return(F1TeamDataAccess.InsertAsync(f1Team));
 }
Beispiel #4
0
 public Task <F1Team> UpdateAsync(F1TeamUpdateModel f1Team)
 {
     return(F1TeamDataAccess.UpdateAsync(f1Team));
 }