public Contact Post(Contact request) { ContactRepository repository = GetContactRepository(); ContactEntity entity = request.TranslateToEntity(); try { entity = repository.Create(entity); } catch (Exception ex) { Console.WriteLine(ex); } return entity.TranslateToResponse(); }
public Contact Get(Contact request) { ContactRepository repository = GetContactRepository(); ContactEntity entity = repository.Read(request.Id); return entity.TranslateToResponse(); }