public Response Insert(Person person) { person.FullName = person.Name + " " + person.Surname; Response responseValidate = Validate(person); if (responseValidate.Success) { Response response = personDAL.Insert(person); return(response); } return(responseValidate); }
/// <summary> /// insert records into database /// </summary> /// <param name="person"></param> /// <returns></returns> public int Insert(Person person) { PersonDAL pDAL = new PersonDAL(); try { return pDAL.Insert(person); } catch { throw; } finally { pDAL = null; } }
public int Insert(string firstName, string lastName, int age) { PersonDAL pDAL = new PersonDAL(); try { return(pDAL.Insert(firstName, lastName, age)); } catch { throw; } finally { pDAL = null; } }
public int Insert(Person person) { PersonDAL PDAL = new PersonDAL(); try { return(PDAL.Insert(person)); } catch (Exception) { throw; } finally { PDAL = null; } }