Example #1
0
 /// <summary>
 /// Add new facility
 /// </summary>
 /// <param name="model">DataModel</param>
 /// <returns>1: Successful, 0: Failed</returns>
 public async Task <int> AddFacility(DataModel model)
 {
     // Insert new service to database
     using (LinqDBDataContext data = new LinqDBDataContext())
     {
         return(await Task.Run(() =>
                               data.SP_INSERT_FACILITY(model.FacilityName, model.TypeID)));
     }
 }