public static dataRS.Resource ToModelData(this objRS.Resource source) { return(new dataRS.Resource() { CreatedBy = source.CreatedBy, CreatedDate = source.CreatedDate, Description = source.Description, Id = source.Id, ImageLink = source.ImageLink, ImageLinkThumb = source.ImageLinkThumb, IsActive = source.IsActive, IsDeleted = source.IsDeleted, Name = source.Name, UpdatedBy = source.UpdatedBy, UpdatedDate = source.UpdatedDate, }); }
public async Task <int> UpdateResource(objModel.Resource resource) { return(await _db.GetAsyncConnection().UpdateAsync(resource.ToModelData())); }